-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Overlay size option: --overlay2=all:memory,size=1g #11723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
c25a5c4
to
10ff226
Compare
Changed syntax from
to
|
9642db8
to
d7cb29a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see the discussion in #11504. I'd prefer not to complicate the --overlay2
flag any further. If you really want to use memory backend via --overlay2=*:memory
, then consider applying memory limits to the entire container. OR try using the file backend with self
medium and setting up size limits on the host rootfs directory.
(deleted wrong comments; let me think) |
New version where overlay size is passed in |
1fff6f9
to
9cd19fd
Compare
Next version ready for review. |
Hello, can I do something to have this PR accepted? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Also, could you update the docs here: gvisor/g3doc/user_guide/filesystem.md Line 37 in 33d4ca3
I think this is useful and others who want to set disk limits without having to jump all the hoops of reconfiguring their Docker home dir with a different filesystem etc will find such docs useful. |
Done and done. |
Can I help with it? |
Our presubmits were broken for past few days. Triggering submit again. |
Implement #11504. Add optional `size=` parameter to `--overlay2` flag: when it is set, overlay upper layer is mounted with given size flag. Tested: ``` sudo bazel-bin/runsc/runsc_/runsc --overlay2=all:memory,size=1m run --bundle ~/bu cont-i root@:/# dd if=/dev/urandom of=/x bs=1k count=1000 1000+0 records in 1000+0 records out 1024000 bytes (1.0 MB, 1000 KiB) copied, 0.0109061 s, 93.9 MB/s root@:/# dd if=/dev/urandom of=/x bs=1k count=1100 dd: error writing '/x': No space left on device 1021+0 records in 1020+0 records out 1044480 bytes (1.0 MB, 1020 KiB) copied, 0.011396 s, 91.7 MB/s ``` ``` -overlay DEPRECATED: use --overlay2=all:memory to achieve the same effect -overlay2 value wrap mounts with overlayfs. Format is * 'none' to turn overlay mode off * {mount}:{medium}[size={size}], where 'mount' can be 'root' or 'all' 'medium' can be 'memory', 'self' or 'dir=/abs/dir/path' in which filestore will be created 'size' optional parameter overrides default overlay upper layer size (default root:self) -panic-log string file path where panic reports and other Go's runtime messages are written. ``` FUTURE_COPYBARA_INTEGRATE_REVIEW=#11723 from stepancheg:overlay-size 451544b PiperOrigin-RevId: 764885043
Implement #11504. Add optional `size=` parameter to `--overlay2` flag: when it is set, overlay upper layer is mounted with given size flag. Tested: ``` sudo bazel-bin/runsc/runsc_/runsc --overlay2=all:memory,size=1m run --bundle ~/bu cont-i root@:/# dd if=/dev/urandom of=/x bs=1k count=1000 1000+0 records in 1000+0 records out 1024000 bytes (1.0 MB, 1000 KiB) copied, 0.0109061 s, 93.9 MB/s root@:/# dd if=/dev/urandom of=/x bs=1k count=1100 dd: error writing '/x': No space left on device 1021+0 records in 1020+0 records out 1044480 bytes (1.0 MB, 1020 KiB) copied, 0.011396 s, 91.7 MB/s ``` ``` -overlay DEPRECATED: use --overlay2=all:memory to achieve the same effect -overlay2 value wrap mounts with overlayfs. Format is * 'none' to turn overlay mode off * {mount}:{medium}[size={size}], where 'mount' can be 'root' or 'all' 'medium' can be 'memory', 'self' or 'dir=/abs/dir/path' in which filestore will be created 'size' optional parameter overrides default overlay upper layer size (default root:self) -panic-log string file path where panic reports and other Go's runtime messages are written. ``` FUTURE_COPYBARA_INTEGRATE_REVIEW=#11723 from stepancheg:overlay-size 451544b PiperOrigin-RevId: 764885043
Fixed tests, replaced Sorry I missed the tests: I cannot run every test on my machine
fails with error I don't understand.
|
Implement #11504. Add optional `size=` parameter to `--overlay2` flag: when it is set, overlay upper layer is mounted with given size flag. Tested: ``` sudo bazel-bin/runsc/runsc_/runsc --overlay2=all:memory,size=1m run --bundle ~/bu cont-i root@:/# dd if=/dev/urandom of=/x bs=1k count=1000 1000+0 records in 1000+0 records out 1024000 bytes (1.0 MB, 1000 KiB) copied, 0.0109061 s, 93.9 MB/s root@:/# dd if=/dev/urandom of=/x bs=1k count=1100 dd: error writing '/x': No space left on device 1021+0 records in 1020+0 records out 1044480 bytes (1.0 MB, 1020 KiB) copied, 0.011396 s, 91.7 MB/s ``` ``` -overlay DEPRECATED: use --overlay2=all:memory to achieve the same effect -overlay2 value wrap mounts with overlayfs. Format is * 'none' to turn overlay mode off * {mount}:{medium}[size={size}], where 'mount' can be 'root' or 'all' 'medium' can be 'memory', 'self' or 'dir=/abs/dir/path' in which filestore will be created 'size' optional parameter overrides default overlay upper layer size (default root:self) -panic-log string file path where panic reports and other Go's runtime messages are written. ``` FUTURE_COPYBARA_INTEGRATE_REVIEW=#11723 from stepancheg:overlay-size 451544b PiperOrigin-RevId: 764885043
Implement #11504. Add optional `size=` parameter to `--overlay2` flag: when it is set, overlay upper layer is mounted with given size flag. Tested: ``` sudo bazel-bin/runsc/runsc_/runsc --overlay2=all:memory,size=1m run --bundle ~/bu cont-i root@:/# dd if=/dev/urandom of=/x bs=1k count=1000 1000+0 records in 1000+0 records out 1024000 bytes (1.0 MB, 1000 KiB) copied, 0.0109061 s, 93.9 MB/s root@:/# dd if=/dev/urandom of=/x bs=1k count=1100 dd: error writing '/x': No space left on device 1021+0 records in 1020+0 records out 1044480 bytes (1.0 MB, 1020 KiB) copied, 0.011396 s, 91.7 MB/s ``` ``` -overlay DEPRECATED: use --overlay2=all:memory to achieve the same effect -overlay2 value wrap mounts with overlayfs. Format is * 'none' to turn overlay mode off * {mount}:{medium}[size={size}], where 'mount' can be 'root' or 'all' 'medium' can be 'memory', 'self' or 'dir=/abs/dir/path' in which filestore will be created 'size' optional parameter overrides default overlay upper layer size (default root:self) -panic-log string file path where panic reports and other Go's runtime messages are written. ``` FUTURE_COPYBARA_INTEGRATE_REVIEW=#11723 from stepancheg:overlay-size 451544b PiperOrigin-RevId: 764885043
I think you can run tests using |
Implement #11504. Add optional `size=` parameter to `--overlay2` flag: when it is set, overlay upper layer is mounted with given size flag. Tested: ``` sudo bazel-bin/runsc/runsc_/runsc --overlay2=all:memory,size=1m run --bundle ~/bu cont-i root@:/# dd if=/dev/urandom of=/x bs=1k count=1000 1000+0 records in 1000+0 records out 1024000 bytes (1.0 MB, 1000 KiB) copied, 0.0109061 s, 93.9 MB/s root@:/# dd if=/dev/urandom of=/x bs=1k count=1100 dd: error writing '/x': No space left on device 1021+0 records in 1020+0 records out 1044480 bytes (1.0 MB, 1020 KiB) copied, 0.011396 s, 91.7 MB/s ``` ``` -overlay DEPRECATED: use --overlay2=all:memory to achieve the same effect -overlay2 value wrap mounts with overlayfs. Format is * 'none' to turn overlay mode off * {mount}:{medium}[size={size}], where 'mount' can be 'root' or 'all' 'medium' can be 'memory', 'self' or 'dir=/abs/dir/path' in which filestore will be created 'size' optional parameter overrides default overlay upper layer size (default root:self) -panic-log string file path where panic reports and other Go's runtime messages are written. ``` FUTURE_COPYBARA_INTEGRATE_REVIEW=#11723 from stepancheg:overlay-size 32c91c3 PiperOrigin-RevId: 764885043
works without container, but if I run in container with Anyway, I will run
for time being. |
Implement #11504. Add optional `size=` parameter to `--overlay2` flag: when it is set, overlay upper layer is mounted with given size flag. Tested: ``` sudo bazel-bin/runsc/runsc_/runsc --overlay2=all:memory,size=1m run --bundle ~/bu cont-i root@:/# dd if=/dev/urandom of=/x bs=1k count=1000 1000+0 records in 1000+0 records out 1024000 bytes (1.0 MB, 1000 KiB) copied, 0.0109061 s, 93.9 MB/s root@:/# dd if=/dev/urandom of=/x bs=1k count=1100 dd: error writing '/x': No space left on device 1021+0 records in 1020+0 records out 1044480 bytes (1.0 MB, 1020 KiB) copied, 0.011396 s, 91.7 MB/s ``` ``` -overlay DEPRECATED: use --overlay2=all:memory to achieve the same effect -overlay2 value wrap mounts with overlayfs. Format is * 'none' to turn overlay mode off * {mount}:{medium}[size={size}], where 'mount' can be 'root' or 'all' 'medium' can be 'memory', 'self' or 'dir=/abs/dir/path' in which filestore will be created 'size' optional parameter overrides default overlay upper layer size (default root:self) -panic-log string file path where panic reports and other Go's runtime messages are written. ``` FUTURE_COPYBARA_INTEGRATE_REVIEW=#11723 from stepancheg:overlay-size 32c91c3 PiperOrigin-RevId: 764885043
Implement #11504. Add optional `size=` parameter to `--overlay2` flag: when it is set, overlay upper layer is mounted with given size flag. Tested: ``` sudo bazel-bin/runsc/runsc_/runsc --overlay2=all:memory,size=1m run --bundle ~/bu cont-i root@:/# dd if=/dev/urandom of=/x bs=1k count=1000 1000+0 records in 1000+0 records out 1024000 bytes (1.0 MB, 1000 KiB) copied, 0.0109061 s, 93.9 MB/s root@:/# dd if=/dev/urandom of=/x bs=1k count=1100 dd: error writing '/x': No space left on device 1021+0 records in 1020+0 records out 1044480 bytes (1.0 MB, 1020 KiB) copied, 0.011396 s, 91.7 MB/s ``` ``` -overlay DEPRECATED: use --overlay2=all:memory to achieve the same effect -overlay2 value wrap mounts with overlayfs. Format is * 'none' to turn overlay mode off * {mount}:{medium}[size={size}], where 'mount' can be 'root' or 'all' 'medium' can be 'memory', 'self' or 'dir=/abs/dir/path' in which filestore will be created 'size' optional parameter overrides default overlay upper layer size (default root:self) -panic-log string file path where panic reports and other Go's runtime messages are written. ``` FUTURE_COPYBARA_INTEGRATE_REVIEW=#11723 from stepancheg:overlay-size 32c91c3 PiperOrigin-RevId: 764885043
Implement #11504.
Add optional
size=
parameter to--overlay2
flag: when it is set, overlay upper layer is mounted with given size flag.Tested: